<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增无流水督办')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: ztree-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content ">
    <form class="form-horizontal m" id="form-paeaErErrorRegister-register"  th:object="${paeaErError}" >
        <input name="errSource" th:field="*{errSource}" type="hidden">
        <input name="auTypeId" th:field="*{auTypeId}" type="hidden">
        <input name="auditItemId" th:field="*{auditItemId}" type="hidden">
        <input name="tradeId" th:field="*{tradeId}" type="hidden">
        <input name="vchFlag" th:field="*{vchFlag}" type="hidden">
        <input name="paeaErPointIds" th:field="*{paeaErPointIds}" type="hidden">
        <div class="row">

            <div class="form-group col-sm-6">
                <label class="col-sm-4 control-label">交易日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>

                        <input name="trDate" class="form-control" placeholder="yyyy-MM-dd" type="text"  th:value="${#dates.format(paeaErError.trDate, 'yyyy-MM-dd')}" th:required="required">
                    </div>
                </div>
            </div>
            <div class="form-group col-sm-6">
                <label class="col-sm-4 control-label">整改期限：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="correctLimitDate" th:value="${#dates.format(paeaErError.correctLimitDate, 'yyyy-MM-dd')}"  class="form-control" placeholder="yyyy-MM-dd" type="text">
                    </div>
                </div>
            </div>
            <div class="form-group col-sm-6">
                <label class="col-sm-4 control-label">机构号：</label>
                <div class="col-sm-8">
                    <input name="orgId" class="form-control" type="text" th:field="*{orgId}" th:required="required">
                </div>
            </div>
            <div class="form-group col-sm-6" style="display: none">
                <label class="col-sm-4 control-label">机构名称：</label>
                <div class="col-sm-8">
                    <input name="orgName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group col-sm-6">
                <label class="col-sm-4 control-label">柜员号：</label>
                <div class="col-sm-8">
                    <input name="tellerId" class="form-control" type="text" th:field="*{tellerId}" th:required="required">
                </div>
            </div>
            <div class="form-group col-sm-6" style="display: none">
                <label class="col-sm-4 control-label">柜员姓名：</label>
                <div class="col-sm-8">
                    <input name="tellerName" class="form-control" type="text">
                </div>
            </div>



            <div class="form-group col-sm-12">
                <label class="col-sm-2  control-label">风险描述：</label>
                <div class="col-sm-10 center-block">
                    <textarea name="auditProceeding"  class="form-control " th:required="required"  type="text" placeholder="请输入监督事项"rows="3"></textarea>
                </div>
            </div>
            <div class="form-group col-sm-12">
                <label class="col-sm-2 control-label">整改建议：</label>
                <div class="col-sm-10">
                    <textarea name="auditSuggest" class="form-control" th:required="required" type="text" placeholder="请输入整改建议" rows="3"></textarea>
                </div>
            </div>
            <div class="form-group col-sm-12" th:style="'display:block'">
                <label class="col-sm-2 control-label">风险点：</label>
                <div class="col-sm-10">
                    <div id="paeaErPoint" class="ztree control-label" th:required="required"></div>
                </div>
            </div>



        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: ztree-js" />
<script type="text/javascript">
    $(function() {
        var auTypeId=$("#auTypeId").val();
        var errSource=$("#errSource").val();
        var url = ctx+"er/paeaErPoint/pointTreeData/"+auTypeId+"/"+errSource;
        var options = {
            id: "paeaErPoint",
            url: url,
            check: { enable: true, nocheckInherit: true, chkboxType: { "Y": "ps", "N": "ps" } },
            expandLevel: 2
        };

        $.tree.init(options);
    });


    var prefix = ctx + "er/paeaErErrorRegister"
    $("#form-paeaErError-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        var paeaErPoints = $.tree.getCheckedNodes();
        $("#paeaErPointIds").val(paeaErPoints);
        if ($.validate.form()) {
            $.operate.save(prefix + "/registerError", $('#form-paeaErErrorRegister-register').serialize());
        }
    }

    $("input[name='trDate']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });

    $("input[name='notifyDate']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });

    $("input[name='correctLimitDate']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });


</script>
</body>
</html>